package com.hdoit.ares.web.ser.modelconfig;
import com.hdoit.ares.web.ser.providers.StaffStoreProvider;
import com.tennetcn.common.enums.regular.RegularExpressions;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RegularExpressionAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      lvsi
 * @email       
 * @createtime  2017年11月25日 16:19:02
 * @comment
 */
public class GoodStoreConfig extends ModelMetadataAttributeConfiguration{
    public GoodStoreConfig(){
        this.setProperty("storeName")
            .hasAttribute(new DisplayNameAttribute("店铺名称"))
        .hasAttribute(new RequiredAttribute("店铺名称为必填项"))
        .hasAttribute(new DropDownListAttribute(new StaffStoreProvider(), false));
        
        this.setProperty("storeAddress")
            .hasAttribute(new DisplayNameAttribute("店铺地址"));

        this.setProperty("storePhone")
            .hasAttribute(new DisplayNameAttribute("联系电话"))
            .hasAttribute(new RegularExpressionAttribute(RegularExpressions.mobile))
        .hasAttribute(new RequiredAttribute("店铺联系电话为必填项"));

        this.setProperty("storeManagerName")
            .hasAttribute(new DisplayNameAttribute("店铺负责人"));

        this.setProperty("storeManagerId")
            .hasAttribute(new DisplayNameAttribute("店铺负责人Id"));

        this.setProperty("code")
            .hasAttribute(new DisplayNameAttribute("全拼"));

        this.setProperty("markCode")
            .hasAttribute(new DisplayNameAttribute("连拼"));

        this.setProperty("storeKeeperName")
            .hasAttribute(new DisplayNameAttribute("店主姓名"));

        this.setProperty("employeeId")
            .hasAttribute(new DisplayNameAttribute("店主Id"));

    }
}